import { IsNotEmpty } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class ArticleCreateDTO {
  @ApiProperty({ description: '标题', example: '标题' })
  @IsNotEmpty({ message: '标题不能为空' })
  readonly title: string;

  @ApiProperty({ description: '内容', example: '内容' })
  @IsNotEmpty({ message: '内容不能为空' })
  readonly content: string;

  @ApiProperty({ description: '描述', example: '描述' })
  @IsNotEmpty({ message: '描述不能为空' })
  readonly description: string;
}
